Displaying the Standard Image-Compression Dialog Box
Standard image-compression dialog components provide two functions that allow you to display the standard dialog box to the user and retrieve the compression parameters specified by the user.
Use the
SCRequestImageSettings
function to retrieve the user's preferences for compressing a single image; use the
SCRequestSequenceSettings
functions when you are working with an image sequence.
Both of these functions manipulate the compression settings that the component stores for you. The component may derive the current settings from a number of different sources:
-
You may supply an image to the component from which it can derive default settings. You do this by using one of the functions discussed in
"Getting Default Settings for an Image or a Sequence,"
.
-
If you have not set any defaults, but you do supply a test image for the dialog, the component examines the test image and derives appropriate default values based upon its characteristics.
-
If you have not set any defaults and do not supply a test image, the component uses its own default values.
-
You may modify the settings by using the
SCSetInfo
function, which is described on
SCSetInfo
.
-
You may allow the user to modify those settings by calling one of the functions discussed in this section.
You may customize the dialog boxes by specifying a modal-dialog hook function or a custom button. You may use the custom button to invoke an ancillary dialog box that is specific to your application. See
"Request Types,"
for more information.
SCRequestImageSettings
The
SCRequestImageSettings
function displays the standard image dialog box to the user; the dialog box is populated with the default settings you have established.
pascal ComponentResult SCRequestImageSettings
(ComponentInstance ci);
-
ci
-
Identifies your application's connection to a standard image-compression dialog component.
DESCRIPTION
The standard dialog component retrieves and validates the user's selections, and saves the resulting settings for use later.
Use this function when you are working with a single still image.
RESULT CODES
scUserCancelled
|
1
|
Dialog box canceled--user clicked Cancel
|
paramErr
|
-50
|
Invalid parameter value
|
SCRequestSequenceSettings
The
SCRequestSequenceSettings
function displays the standard sequence dialog box to the user; the dialog box uses the default settings you have established.
pascal ComponentResult SCRequestSequenceSettings
(ComponentInstance ci);
-
ci
-
Identifies your application's connection to a standard image-compression dialog component.
DESCRIPTION
The standard dialog component retrieves and validates the user's selections, and saves the resulting settings for use later.
Use this function when you are working with an image sequence.
RESULT CODES
scUserCancelled
|
1
|
Dialog box canceled--user clicked Cancel
|
paramErr
|
-50
|
Invalid parameter value
|
© 1997 Apple Computer, Inc.Previous | Chapter Top | Chapter Contents | Next